package com.woniuxy.feign;

import com.woniuxy.feign.hystrix.UserHystrix;
import com.work.framework.pojo.User;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;

/**
 * @Author: wanghao
 * @Date: 2019/9/20 11:05
 */
@FeignClient(value = "user-server",fallback = UserHystrix.class)
public interface UserFeign {

    /**
     * 查找user成功
     * @param uid
     * @return
     */
    @GetMapping("/user/findUser/{uid}")
     User findUser(@PathVariable("uid") Integer uid);


    /**
     * 查找users成功
     * @param users
     * @return
     */
    @GetMapping("/user/findUsers/{users}")
    List<User> findUsers(@PathVariable("users") String users);


}
